package com.study.design.pattern.principle.compositionaggregation;

/**
 * @Author: gongsl
 * @Date: 2025-01-12 22:44
 * @description:
 */
public class Test {
    public static void main(String[] args) {
        ProductDao productDao = new ProductDao();
        productDao.setConnection(new MySQLConnection());
        productDao.addProduct();

        productDao.setConnection(new OracleConnection());
        productDao.addProduct();
    }
}
